#include "MPropertyMap.h"
#include <QRect>
#include <QScreen>
#include <QDebug>
#include "../../publicinc.h"


MPropertyMap * MPropertyMap::instance = nullptr;


MPropertyMap::MPropertyMap(QObject *parent) : QObject(parent)
{
}


MPropertyMap *MPropertyMap::GetInstance()
{
    if(nullptr == instance)
    {
        instance = new MPropertyMap();
    }
    return instance;
}

void MPropertyMap::setRootObject(QObject *obj)
{
    AppRoot = obj;
}


void MPropertyMap::_connectType(QString data)
{
    QObject *halconForm = AppRoot->findChild<QObject*>(data);

    if (halconForm)
    {
        qDebug()<<__FUNCTION__<<__LINE__<<"C++ connect Signals!";
        //QObject::connect(ImageProvider::GetInstance(), SIGNAL(setHalconImage(HalconCpp::HImage)), halconForm, SLOT(setImage(HalconCpp::HImage)));
    }else{
        qDebug()<<"C++ connect false!";
    }
}
